package fr.fitec.qcmPlus.beans;

import java.io.Serializable;
import java.sql.Timestamp;

import fr.fitec.qcmPlus.constants.QcmConstants;

public class Question implements Serializable {

	private static final long serialVersionUID = 1L;

    
    private int idQuestion = QcmConstants.ID_INVALIDE;
    private String intitule;
    private int idQuestionnaire = QcmConstants.ID_INVALIDE;
    private String statut;
    private Timestamp date_creation;
	private Timestamp date_maj;
	private Timestamp date_suppr;
	
	public Question(){
	}
	
	
	public Question(Question quest){
		this.idQuestion      = quest.idQuestion;
		this.intitule        = quest.intitule;
		this.idQuestionnaire = quest.idQuestionnaire;
		this.statut          = quest.statut;
		this.date_creation   = quest.date_creation;
		this.date_maj        = quest.date_maj;
		this.date_suppr      = quest.date_suppr;
	}
	
	
	public int getIdQuestion() {
		return idQuestion;
	}
	public void setIdQuestion(int idQuestion) {
		this.idQuestion = idQuestion;
	}
	public String getIntitule() {
		return intitule;
	}
	public void setIntitule(String intitule) {
		this.intitule = intitule;
	}
	public int getIdQuestionnaire() {
		return idQuestionnaire;
	}
	public void setIdQuestionnaire(int idQuestionnaire) {
		this.idQuestionnaire = idQuestionnaire;
	}
	public String getStatut() {
		return statut;
	}
	public void setStatut(String statut) {
		this.statut = statut;
	}
	public Timestamp getDate_creation() {
		return date_creation;
	}
	public void setDate_creation(Timestamp date_creation) {
		this.date_creation = date_creation;
	}
	public Timestamp getDate_maj() {
		return date_maj;
	}
	public void setDate_maj(Timestamp date_maj) {
		this.date_maj = date_maj;
	}
	public Timestamp getDate_suppr() {
		return date_suppr;
	}
	public void setDate_suppr(Timestamp date_suppr) {
		this.date_suppr = date_suppr;
	}

    @Override
    public String toString()
    {
        final StringBuilder sb = new StringBuilder();
            
        sb.append("idQuestion: "+this.getIdQuestion()).append("\n");
        sb.append("intitule: "+this.getIntitule()).append("\n");
        sb.append("idQuestionnaire: "+this.getIdQuestionnaire()).append("\n");
        sb.append("statut: "+this.getStatut()).append("\n");
        sb.append("date creation: "+this.getDate_creation()).append("\n");
        sb.append("date maj: "+this.getDate_maj()).append("\n");
        sb.append("date suppr: "+this.getDate_suppr());

        return sb.toString();
    }
	
}
